﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace openlistview_example
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            for (int i = 0; i < openlistview1.Groups.Count; i++)
            {
                openlistview1.Groups[i].Header = "Tesgroup" + i;
                for (int j = 0; j < 10; j++)
                {
                    var listViewItem = new ListViewItem(openlistview1.Groups[i]) { Text = "Test" + j };
                    listViewItem.ImageIndex = i;
                    openlistview1.Items.Add(listViewItem);
                }

            }
            for (int i = 0; i < openlistview2.Groups.Count; i++)
            {
                openlistview2.Groups[i].Header = "Tesgroup" + i;
                for (int j = 0; j < 10; j++)
                {
                    var listViewItem = new ListViewItem(openlistview2.Groups[i]) { Text = "Test" + j };
                    listViewItem.ImageIndex = i;
                    openlistview2.Items.Add(listViewItem);
                }

            }
            for (int i = 0; i < openlistview3.Groups.Count; i++)
            {
                openlistview3.Groups[i].Header = "Tesgroup" + i;
                for (int j = 0; j < 10; j++)
                {
                    var listViewItem = new ListViewItem(openlistview3.Groups[i]) { Text = "Test" + j };
                    listViewItem.ImageIndex = i;
                    openlistview3.Items.Add(listViewItem);
                }

            }
            for (int i = 0; i < openlistview4.Groups.Count; i++)
            {
                openlistview4.Groups[i].Header = "Tesgroup" + i;
                for (int j = 0; j < 10; j++)
                {
                    var listViewItem = new ListViewItem(openlistview4.Groups[i]) { Text = "Test" + j };
                    listViewItem.ImageIndex = i;
                    openlistview4.Items.Add(listViewItem);
                }

            }
            for (int i = 0; i < openlistview5.Groups.Count; i++)
            {
                openlistview5.Groups[i].Header = "Tesgroup" + i;
                for (int j = 0; j < 10; j++)
                {
                    var listViewItem = new ListViewItem(openlistview5.Groups[i]) { Text = "Test" + j };
                    listViewItem.ImageIndex = i;
                    openlistview5.Items.Add(listViewItem);
                }

            }
            for (int i = 0; i < openlistview6.Groups.Count; i++)
            {
                openlistview6.Groups[i].Header = "Tesgroup" + i;
                for (int j = 0; j < 10; j++)
                {
                    var listViewItem = new ListViewItem(openlistview6.Groups[i]) { Text = "Test" + j };
                    listViewItem.ImageIndex = i;
                    openlistview6.Items.Add(listViewItem);
                }

            }
        }
    }
}
